import { createRouter, createWebHistory } from 'vue-router';
import Index from '@/views/index/index.vue';
import EmpReport from '@/views/report/emp/index.vue';
import StuReport from '@/views/report/stu/index.vue';
import Log from '@/views/log/index.vue';
import Login from '@/views/login/index.vue';
import Layout from '@/views/layout/index.vue';
import User from '@/views/user/index.vue';
import Strategy from '@/views/strategy/index.vue';
import StrategyShow from '@/views/strategy/show.vue';
import GameCategory from '@/views/category/index.vue';
import GameData from '@/views/gameData/index.vue';
import Comment from '@/views/comment/index.vue';

const routes = [
  { path: '/', 
    component: Layout,
    redirect: '/index',
    children: [
      { path: '/index', component: Index },
      { path: '/report/emp', component: EmpReport },
      { path: '/report/stu', component: StuReport },
      { path: '/log', component: Log },
      { path: '/user', component: User },
      { path: '/strategy', component: Strategy },
      { path: '/strategy/show', component: StrategyShow },
      { path: '/category', component: GameCategory },
      { path: '/gameData', component: GameData },
      { path: '/comment', component: Comment }
    ]
  },
  { path: '/login', component: Login }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;